<template>
  <div class="sellHeader">
    <div class="sellHeader-top">
      <div class="sellHeader-left">
        <img
          :src="seller.avatar"
          alt=""
        >
      </div>
      <div class="sellHeader-content">
        <div class="sellHeader-content-title">
          <img
            src="../../../resource\img\brand@3x.png"
            alt=""
            class="img-brand"
          >
          <span class="sellHeader-shop">{{seller.name}}</span>
        </div>
        <span class="sellHeader-transport">{{seller.description}}/{{seller.deliveryTime}}分钟送达</span>
        <div class="sellHeader-pay">
          <img
            src="../../../resource\img\decrease_1@3x.png"
            alt=""
          >
          <span v-for="(index,item) in seller.supports" :key="index">{{item.description}}</span>
        </div>
      </div>
      <div class="sellHeader-right">
        <span>5个</span>
        <span>></span>
      </div>
    </div>
    <div class="sellHeader-button">
      <div class="sellHeader-info">
        <span >公告</span>
      </div>
      <div class="sellHeader-detail">粥品香坊其烹饪粥料的秘方源于中国千年古法，在融和现代制作工艺，由世界烹饪大师屈浩先生领衔研发。坚守纯天然、0添加的良心品质深得消费者青睐，发展至今成为粥类的引领品牌。是2008年奥运会和2013年园博会指定餐饮服务商。</div>
      <van-icon name="arrow" style="color:rgb(255,255,255)"/>
    </div>
  </div>
</template>

<script>
import Vue from 'vue';
import { Icon } from 'vant';

Vue.use(Icon);
export default {
  name: "sellHeader",
  data() {
    return {
      seller: {}
    };
  },
  created(){
    this.getSeller()
  },
  methods: {
    getSeller() {
      this.axios.get('/api/seller').then((res)=>{
        var res=JSON.parse(JSON.stringify(res));
        if(res.data.errno === 0) {
          this.seller = res.data.data;
          console.log('this.seller', this.seller)
        }

      })

    }
  }
};
</script>

<style lang="scss" scoped>
.sellHeader {
  overflow: hidden;
  background-color: rgba(7, 17, 27, 0.5);
  .sellHeader-top {
    display: flex;
    margin: 48px 24px 0 48px;
    .sellHeader-left {
      width: 128px;
      height: 128px;
      margin-right: 32px;
      margin-bottom: 36px;
      img {
        width: 100%;
        border-radius: 4px;
      }
    }
    .sellHeader-content {
      display: flex;
      flex-direction: column;
      .sellHeader-content-title {
        margin-top: 4px;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        .sellHeader-shop {
          font-size: 32px;
          color: rgb(255, 255, 255);
          font-weight: bold;
          line-height: 32px;
        }
        .img-brand {
          height: 32px;
          margin-right: 12px;
        }
      }
      .sellHeader-transport {
        font-size: 24px;
        color: rgb(255, 255, 255);
        font-weight: 200;
        line-height: 24px;
        margin-top: 16px;
        margin-bottom: 20px;
      }
      .sellHeader-pay {
        display: flex;
        align-items: center;
        img {
          height: 20px;
          margin-right: 8px;
          margin-top: 2px;
        }
        span {
          font-size: 20px;
          color: rgb(255, 255, 255);
          font-weight: 200;
          line-height: 24px;
          margin-right: 4px;
        }
      }
    }
    .sellHeader-right {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      padding: 14px 16px;
      height: 48px;
      background-color: rgba(0, 0, 0, 0.2);
      border-radius: 24px;
      margin-top: 80px;
      span {
        margin-right: 4px;
        font-size: 20px;
        font-weight: 200;
        color: rgb(255, 255, 255);
      }
    }
  }
  .sellHeader-button {
    background-color: rgba(7, 17, 27, 0.1);
    height: 56px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    .sellHeader-info {
      display: flex;
      width: 60px;
      height: 26px;
      font-weight: 600;
      font-size: 18px;
      background-color: #fff;
      color:rgb(79, 86, 93);
      border-radius: 2px;
      align-items: center;
      justify-content: center;
      flex-wrap: nowrap;
      margin-right: 8px;
    }
    .sellHeader-detail {
      color: rgb(255, 255, 255);
      font-size: 20px;
      font-weight: 200;
      min-width: 0;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      width: 600px;
    }
  }
}
</style>

